const fs = require('fs')
const {JSDOM} = require('jsdom')
fs.readFile('./bookmarks.html', 'utf-8', (err, result) => {
    if(!err) {
        const htmlDoc = new JSDOM(result)
        // console.log(htmlDoc)
        const allDir = htmlDoc.window.document.querySelectorAll('DT > H3');
        console.log(allDir.length)
        // console.log(htmlDoc.window.document.querySelectorAll('DT > A'))
        const bookmarks = []
        allDir.forEach(dir => {
            console.log(dir.textContent, dir.parentNode.nextSibling)
        })
    }
})